﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Net.Mime.MediaTypeNames;

namespace DatabaseManager.Data.Repositories
{
    public interface IDatabaseRepository
    {
        Task<Guid> SaveDatabaseConnectionAsync(DatabaseConnection connection);
        Task<DatabaseConnection> GetDatabaseConnectionAsync(Guid id);
        Task<List<DatabaseConnection>> GetAllConnectionsAsync();
        Task DeleteDatabaseConnectionAsync(Guid id);

        Task<Guid> SaveApplicationAsync(Application application);
        Task<Application> GetApplicationAsync(Guid id);
        Task<List<Application>> GetAllApplicationsAsync();
        Task DeleteApplicationAsync(Guid id);

        Task SaveApplicationDatabaseRelationAsync(Guid applicationId, Guid databaseId);
        Task RemoveApplicationDatabaseRelationAsync(Guid applicationId, Guid databaseId);
        Task<List<Guid>> GetRelatedDatabasesAsync(Guid applicationId);
        Task<List<Guid>> GetRelatedApplicationsAsync(Guid databaseId);

        Task<Guid> SaveGeneratedClassAsync(GeneratedClass generatedClass);
        Task<GeneratedClass> GetGeneratedClassAsync(Guid id);
        Task<List<GeneratedClass>> GetAllGeneratedClassesAsync();
        Task DeleteGeneratedClassAsync(Guid id);
    }

}
